/**
 * 
 */
package com.nd.android.payment.ui.adapter;

import java.util.ArrayList;

import android.app.Activity;
import android.graphics.Typeface;

import antistatic.spinnerwheel.adapters.AbstractWheelTextAdapter;



/**
 * 适配器
 * <br>
 * Created 2014-11-2 上午11:25:46
 * 
 * @version
 * @author 张清荣
 * 
 * @see
 * 
 *      Copyright(c) 2009-2014, TQ Digital Entertainment, All Rights Reserved
 * 
 */

public class CommonPayWheelAdapter extends AbstractWheelTextAdapter {

    ArrayList data;

    public CommonPayWheelAdapter(Activity activity, ArrayList list) {
        super(activity);
        this.data = list;
    }

    @Override
    public int getItemsCount() {
        if(data != null) {
            return data.size();
        }
        return 0;
    }

    @Override
    protected CharSequence getItemText(int index) {
        if(data != null && data.size()>0) {
            return data.get(index) + "";
        }
        return "0";
    }

    protected CharSequence getCurItemText(int index) {
        if(data != null && data.size()>0) {
            return data.get(index) + "";
        }
        return "0";
    }

}
